package com.metacube.questionbank.model;

import java.sql.Timestamp;

/*
 * @author Team Neeraj Jain
 * */
public class Answer {
	private int ansId;
	private String answerDesc;
	private int userId;
	private Timestamp answerDate;
	private int questionId;

	/*
	 * Parameterized constructor of class.
	 */
	public Answer(int ansId, String answerDesc, int userId,
			Timestamp answerDate, int questionId) {
		super();
		this.ansId = ansId;
		this.answerDesc = answerDesc;
		this.userId = userId;
		this.answerDate = answerDate;
		this.questionId = questionId;
	}

	/*
	 * Default constructor of class.
	 */
	public Answer() {
	}

	/*
	 * This method returns the answer id of answer
	 * 
	 * @return ansId id of answer
	 */
	public int getAnsId() {
		return ansId;
	}

	/*
	 * @param ansId id of answer This method sets the id of answer.
	 */
	public void setAnsId(int ansId) {
		this.ansId = ansId;
	}

	/*
	 * This method returns the description of answer
	 * 
	 * @return anwerDesc description of answer
	 */
	public String getAnswerDesc() {
		return answerDesc;
	}

	/*
	 * @param answerDesc description of answer This method sets the description
	 * of answer
	 */
	public void setAnswerDesc(String answerDesc) {
		this.answerDesc = answerDesc;
	}

	/*
	 * This method returns the id of user who posted this answer.
	 * 
	 * @return userId id of user.
	 */
	public int getUserId() {
		return userId;
	}

	/*
	 * @param userId id of user This method sets the id of user who posted the
	 * answer
	 */
	public void setUserId(int userId) {
		this.userId = userId;
	}

	/*
	 * This method returns the date when the answer was posted.
	 * 
	 * @return answerDate date of answer.
	 */
	public Timestamp getAnswerDate() {
		return answerDate;
	}

	/*
	 * @param answerDate date of answer This method sets the date of answer when
	 * the answer was posted
	 */
	public void setAnswerDate(Timestamp answerDate) {
		this.answerDate = answerDate;
	}

	/*
	 * This method returns the id of question whose answer was posted.
	 * 
	 * @return questionId id of question.
	 */
	public int getQuestionId() {
		return questionId;
	}

	/*
	 * @param questionId id of question This method sets the id of question.
	 */
	public void setQuestionId(int questionId) {
		this.questionId = questionId;
	}
}
